package com.mr.cai.main.activity;

import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

import com.custom.vg.list.CustomListView;
import com.mr.cai.main.R;
import com.mr.cai.main.view.ClassifyImagePager;

/**
 * Created by Administrator on 16-3-4.
 */
public class ClassifyDetailActivity extends TopViewBaseActivity {
    private ClassifyImagePager mHeadImagePager,mMayPayPager;
    private LinearLayout inDicator;
    private TextView productTitle,productDes,productPrice;
    private CustomListView mCustomListView;
    private TextView commentRatio,commentNums;
    private ListView shortCommentLv;
    private ImageView addBtn,plusBtn,shoppingCartBtn;
    private TextView payNumsTv;
    private View mView;
    private ImageView backImg;
    @Override
    protected void setTopView() {
        super.setTopView();
        topRootView.setVisibility(View.GONE);

    }

    @Override
    protected void setRootView() {
        super.setRootView();
        backImg =new ImageView(this);
        backImg.setBackgroundResource(R.drawable.login_back_bg);
        rootView.addView(backImg,INDEX_SECOND);
    }

    @Override
    protected boolean isAttach() {
        return false;
    }

    @Override
    protected View getContentView() {
        mView=View.inflate(this, R.layout.classify_detail_layout,null);
        initView();
        return mView;
    }

    private void initView() {
        mHeadImagePager=(ClassifyImagePager)mView.findViewById(R.id.headImagePager);

        mMayPayPager=(ClassifyImagePager)mView.findViewById(R.id.mayPayPager);

        inDicator=(LinearLayout)mView.findViewById(R.id.index_product_images_indicator);

        productTitle=(TextView)mView.findViewById(R.id.productTitle);

        productPrice=(TextView)mView.findViewById(R.id.productPrice);

        mCustomListView=(CustomListView)mView.findViewById(R.id.sexangleView);

        commentRatio=(TextView)mView.findViewById(R.id.commentRatio);

        commentNums=(TextView)mView.findViewById(R.id.commentNums);

        shortCommentLv=(ListView)mView.findViewById(R.id.shortCommentLv);

        addBtn=(ImageView)mView.findViewById(R.id.addBtn);

        plusBtn=(ImageView)mView.findViewById(R.id.plusBtn);

        shoppingCartBtn=(ImageView)mView.findViewById(R.id.shopingCart);

        payNumsTv=(TextView)mView.findViewById(R.id.payNums);

    }

    @Override
    protected void setContentListener() {
        backImg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

    @Override
    protected void destoryData() {
        mHeadImagePager=null;
        mMayPayPager=null;
        inDicator=null;
        productTitle=null;
        productDes=null;
        productPrice=null;
        mCustomListView=null;
        commentRatio=null;
        commentNums=null;
        shortCommentLv=null;
        mView=null;
    }
}
